<?php
header("Pragma: public");
header("Expires: 0");
header("Accept-Ranges: bytes");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/vnd.ms-word");
header('Content-Disposition: attachment; filename=tgintakeorgsabiturients.doc');
header("Content-Transfer-Encoding: binary");
?>
<h3>Количество и списки целевиков по организациям</h3>
<table>
<?php foreach ($tgorgslist as $tgorglist):
	echo '<tr>';
	echo '<td>';
	echo 'Организация - <b>'.$tgorglist['org'].'</b><br>';
	echo  'количество - <b>'.$tgorglist['count'].'</b><br>';
		$abiturients = $tgorglist['abiturients'];
		if ($abiturients) {
			foreach ($abiturients as $abiturient):
				echo $abiturient.'<br>';
			endforeach;
		}
	echo '</td>';
	echo '</tr>';
	endforeach;
?>
</table>